package com.zhang.backend.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.zhang.backend.entity.Person;
import lombok.Data;

import java.util.List;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL) // JSON序列化时，忽略null值的字段
public class FamilyTreeNodeDTO {
    private Person husband;
    private Person wife;
    private List<FamilyTreeNodeDTO> children; // 子女节点，每个子女又是一棵子树
}